<admintpl file="header" />

</head>

<body>

<div class="wrap">


    <ul class="nav nav-tabs">

        <li class="active"><a href="#A">会员卡列表</a></li>

        <li><a href="{:U('add')}">添加会员卡</a></li>


    </ul>

    <form class="well form-search" method="GET" action="/index.php">

        <input type="hidden" name="g" value="Cardlevel">

        <input type="hidden" name="m" value="Setting">

        <input type="hidden" name="a" value="index">

        ID:

        <input type="text" name="id" class="span1" value="{$id}" placeholder="ID">&nbsp;

        级别名称:

        <input type="text" name="cardname" style="width: 120px;" value="{$cardname}" placeholder="请输入级别名称">&nbsp;

        是否启用:

        <select name="status">
            <option value="-1">全部</option>
            <option value="1" <if condition="$status eq 1">selected</if> >启用中</option>
            <option value="2" <if condition="$status eq 2">selected</if> >已废除</option>
        </select>



        <input type="submit" class="btn btn-primary" value="搜索" />

    </form>

    <form method="post" class="js-ajax-form">

        <table class="table table-hover table-bordered">

            <thead>

            <tr>

                <th align="center">ID</th>

                <th>级别名称</th>

                <th>售卡金额(元)</th>

                <th>有效期</th>

                <th>初始金额(元)</th>

                <th>备注</th>

                <th>状态</th>

                <th align="center">操作</th>

            </tr>

            </thead>

            <tbody>

            <foreach name="lists" item="vo">

                <tr>

                    <td align="center">{$vo.id}</td>

                    <td>{$vo['cardname']}</td>

                    <td>{$vo['sellprice']}</td>

                    <td>
                        <if condition="$vo['usedanwei'] eq -1">
                            永久

                            <else/>

                            {$vo['usetime']}
                            <if condition="$vo['usedanwei'] eq 't'">
                                天
                                <elseif condition="$vo['usedanwei'] eq 'y'"/>
                                        月
                                <elseif condition="$vo.usedanwei eq 'n'"/>
                                        年
                            </if>

                        </if>

                    </td>

                    <td>{$vo.initprice}</td>

                    <td>{$vo.remark}</td>

                    <th>
                        <if condition="$vo['status'] eq 1">
                            启用中
                        <elseif condition="$vo['status'] eq 2"/>
                            已废除
                        </if>

                    </th>

                    <td align="center">


                        <if condition="$vo['status'] eq 1">
                            <a   href="{:U('Setting/edit',array('id'=>$vo['id']))}">编辑</a>
                            <a  class="js-ajax-dialog-btn" data-msg="是否要废除" href="{:U('del',array('id'=>$vo['id'],'use'=>2))}">废除</a>

                            <elseif condition="$vo['status'] eq 2"/>
                            <a  class="js-ajax-dialog-btn" data-msg="是否要启用" href="{:U('Setting/del',array('id'=>$vo['id'],'use'=>1))}">启用</a>

                        </if>

                    </td>

                </tr>

            </foreach>

            </tbody>

        </table>

        <div class="pagination">{$page}</div>

    </form>

</div>

<script src="__PUBLIC__/js/common.js"></script>

</body>

</html>